“ModuleNotFoundError: No module named ‘distutils.util’” when trying to build snaps on Launchpad (but works locally)
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
This initially started as a discussion on the forum, so the whole gist of the problem is explained there:
https://forum.snapcraft.io/t/modulenotfounderror-no-module-named-distutils-util-when-trying-to-build-snaps-on-launchpad-but-works-locally/15434
In a nutshell:
- A snapcraft recipe can be build locally on my laptop, but fails to build on Launchpad build infrastructure due to "No module named 'distutils.util'" error.
- The problem seems to be that there are some parts built before the part where it fails, pulling some python3 dependencies (but not python3-distutils) that are cached in the stage directory
- When the main part is built, snapcraft tries to used cached data instead of pulling fresh one, resulting in a missing dependency
Workaround
In my case, cjp256 suggested to add `python3-distutils` to sosreport part `stage-packages`.
Evaluation history
No evaluation history available.